package com.xdy.mdc.activity;

import android.widget.Toast;

import com.xdy.mdc.R;
import com.xdy.mdc.databinding.ActivityNavigationRailBinding;

public class NavigationRailActivity extends BaseViewModelActivity<ActivityNavigationRailBinding> {
    @Override
    protected void initListeners() {
        binding.navigationRail.getHeaderView().findViewById(R.id.image).setOnClickListener(v -> Toast.makeText( NavigationRailActivity.this, "图片点击", Toast.LENGTH_SHORT ).show());
        binding.navigationRail.setOnItemSelectedListener(item -> {
            binding.content.setText(item.getTitle());
            return false;
        });
    }
}